Sqlite Note
Meow King October 30, 2023 Updated: October 30, 2023 #sqlite #sql #note-
return the rows being inserted, deleted, or updated.
See RETURNING
Example Usage:( a INTEGER PRIMARY KEY, b DATE DEFAULT CURRENT_TIMESTAMP, c INTEGER ); INSERT INTO t0(c) VALUES (random), (random) RETURNING *; -
use
PRAGMA foreign_keys = ON;to enable foreign key check. -
specific types like
CHAR(30),CHAR(50)are eventually converted into sqlite built-in types likeTEXT. So there is no length check for string.
Datatypes In SQLite #3.1.1. Affinity Name Examples -
Primary Key uauslly not the true primary key, and the
rowidis.
exception: Integer Primary Key becomes an alias for therowidin Rowid Tables.
If there is not integer primary key alias asrowid, thenrowidis not persistent. To See rowid:select rowid, * from table; -- or `oid`, `_rowid_`See Rowid Tables